<!DOCTYPE html>
<%@ page import="domain.repro.Repro, svc.ReproSvc, domain.repro.SeasonalityRepro,constants.Constants;" %>
<%
	String userName="";
if(request.getSession().getAttribute("name")!=null){
	userName=request.getSession().getAttribute("name").toString();
}
if(!userName.equals("")) { 
 String fileNo=(String)session.getAttribute("fileNo");
 Repro repro = (Repro) request.getAttribute("repro");
 
 double unit = (Double)session.getAttribute("unit");

SeasonalityRepro seasonalityConc = repro.getSeasonalityConc();

SeasonalityRepro seasonalityHeat = repro.getSeasonalityHeat();
		double[] abortRisk = repro.getAbortRisk();
		double[] concRisk= repro.getConcRisk();
		
		double[] pctConcMim= repro.getPctConcMim();
		double[] pctHeatMim= repro.getPctHeatMim();			
		
		
%>
<html lang="en">
  <head>
    <title>Set Values</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="../css/bootstrap.css" rel="stylesheet">
<!--    <link href="../css/bootstrap-responsive.css" rel="stylesheet">-->
     <link href="../css/docs.css" rel="stylesheet">
<link href="../css/google-code-prettify/prettify.css" rel="stylesheet">
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    
    
    
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
	  
	  
	
    </style>
   

    
   
  </head>

  <body onLoad="displayReproResults(1);displayReproResults(2)">

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
        <a class="brand" href="#">DairyVIP Project</a>
          <div class="nav-collapse collapse">
            <p class="navbar-text pull-right">
              Logged in as <a href="#" class="navbar-link"><%=userName%></a>
            </p>
            <ul class="nav">
           <li ><a href="../jsp/index.jsp">Home</a></li>
              <li><a href="../jsp/acknowledgements_contro.jsp">Acknowledgements/Contributors</a></li>
            <li><a href='../jsp/dataset.jsp'>My DairyVIP</a></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    
    <!-- Docs nav
    ================================================== -->
   
      
<!--<ul class="nav nav-list bs-docs-sidenav">
          <li><a href="woods"><i class="icon-chevron-right"></i> Wood's curves</a></li>
          <li><a href="#fit"><i class="icon-chevron-right"></i> Fit curves</a></li>
          <li><a href="#florida"><i class="icon-chevron-right"></i> Florida curves</a></li>
          <li><a href="#diphasic"><i class="icon-chevron-right"></i> Diphasic curves</a></li>
           </ul>-->
           
           <div class="container">
           <div class="pagination ">
    <ul>
<li><a href="../jsp/inputMisc">Misc</a></li>
   <li><a href="../jsp/inputPrice">Price</a></li>
    <li><a href="../jsp/inputMilk" >Milk</a></li>
    <li ><a href="../jsp/inputCull">Cull</a></li>
    <li class="active"><a href="#">Repro</a></li>
    <li><a href="../jsp/inputBW">Bodyweight</a></li>
    </ul>
    </div></div>

<div class="container">
<legend><small>REPRODUCTION</small></legend>    
    
<form id="myForm" >
<div class="container0">
<table width="80%"><!--<tr><td style="background-color: #f5f5f5; border:solid 1px #ccc; font-size:11px">
<table width="100%"><tr><td colspan="2" style="border:#CCC solid 1px">Breeding period</td></tr>   
<tr><td width="55%">cost per breeding($)</td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"    id="p_semen" size="4" type="text" value="20" name="p_semen">%</td></tr></table></td></tr>-->
<tr><td>&nbsp;</td></tr><tr><td style="background-color: #f5f5f5; border:solid 1px #ccc; font-size:11px">
<table width="100%"><tr><td colspan="2" style="border:#CCC solid 1px; ">Repro function</td></tr>   
<tr>
  <td width="40%">+/- </td><td><input class="span1"  style=" width: 30px; font-size:90%"    id="concabs" size="4" type="text" value="10" name="concabs" onChange="displayReproResults(1)"></td></tr><!--<tr><td ></td><td><input class="span1"  style=" width: 30px; font-size:90%"    id="concmim2" size="4" type="text" value="34" name="concmim2">%</td></tr>--><!--<tr><td width="55%">Seasonality</td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"    id="concseapct" size="4" type="text" value="100" name="concseapct">%</td></tr>--></table>
</td></tr>
<tr><td style="background-color: #f5f5f5; border:solid 1px #ccc;"><table id="reproinput1"></table></td></tr>
<tr><td  >&nbsp;</td></tr><tr>

<tr><td  >&nbsp;</td></tr><tr><td style="background-color: #f5f5f5; border:solid 1px #ccc; ">
<table width="100%" >   
<tr><td width="40%" >+/- </td><td><input class="span1"  style=" width: 30px; font-size:90%"    id="heatabs" size="4" type="text" value="0" name="heatabs" onChange="displayReproResults(2)"></td></tr><!--<tr><td width="55%">Seasonality</td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"    id="heatseapct" size="4" type="text" value="100" name="heatseapct">%</td></tr>--></table>
</td></tr><tr><td style="background-color: #f5f5f5; border:solid 1px #ccc;">
<table id="reproinput2"></table>

</td></tr></table>
<p>&nbsp;</p>


<!--<input class="btn" type="button" onclick="displayReproResults(); " value="Go" /> <br> <p>Please click this "Go" button. The computing results will be shown in the right table.</p><br>-->
</div>


<div class="span9">
   <h5>Probability of service per 21 days</h5>

<table width="95%">
 <!--<thead>  
    <tr><th>Month</th><th>Jan</th>
    <th>Feb</th>
    <th>Mar</th>
    <th>Apr</th>
    <th>May</th>
    <th>Jun</th>
    <th>Jul</th>
    <th>Aug</th>
    <th>Sep</th>
    <th>Oct</th>
    <th>Nov</th>
    <th>Dec</th></tr></thead>-->
<tbody>
<tr><td width="12%"><strong>Seasonality</strong></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea1" size="4" type="text" value="100" name="heatsea1" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea2" size="4" type="text" value="100" name="heatsea2" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea3" size="4" type="text" value="100" name="heatsea3" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea4" size="4" type="text" value="100" name="heatsea4" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea5" size="4" type="text" value="100" name="heatsea5" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea6" size="4" type="text" value="100" name="heatsea6" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea7" size="4" type="text" value="100" name="heatsea7" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea8" size="4" type="text" value="100" name="heatsea8" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea9" size="4" type="text" value="100" name="heatsea9" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea10" size="4" type="text" value="100" name="heatsea10" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea11" size="4" type="text" value="100" name="heatsea11" onChange="displayReproResults(2)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="heatsea12" size="4" type="text" value="100" name="heatsea12" onChange="displayReproResults(2)">%</td></tr> </tbody></table>     

     
       
           <table id="myTable2" style="background-color: #f5f5f5; border:solid 1px #ccc; font-size:12px"></table>

<p></p>

 <h5> Probability of conception</h5> 
<table width="95%">
<!-- <thead>  
    <tr><<th>Month</th><th>&nbsp;&nbsp;</th><th>Jan</th>
    <th>Feb</th>
    <th>Mar</th>
    <th>Apr</th>
    <th>May</th>
    <th>Jun</th>
    <th>Jul</th>
    <th>Aug</th>
    <th>Sep</th>
    <th>Oct</th>
    <th>Nov</th>
    <th>Dec</th></tr></thead>-->
<tbody>
<tr><td width="12%"><strong>Seasonality</strong></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea1" size="4" type="text" value="100" name="concsea1" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea2" size="4" type="text" value="100" name="concsea2" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea3" size="4" type="text" value="100" name="concsea3" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea4" size="4" type="text" value="100" name="concsea4" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea5" size="4" type="text" value="100" name="concsea5" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea6" size="4" type="text" value="100" name="concsea6" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea7" size="4" type="text" value="100" name="concsea7" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea8" size="4" type="text" value="100" name="concsea8" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea9" size="4" type="text" value="100" name="concsea9" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea10" size="4" type="text" value="100" name="concsea10" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea11" size="4" type="text" value="100" name="concsea11" onChange="displayReproResults(1)">%</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="concsea12" size="4" type="text" value="100" name="concsea12" onChange="displayReproResults(1)">%</td></tr> </tbody></table>  

           <table id="myTable1" style="background-color: #f5f5f5; border:solid 1px #ccc;  font-size:12px" >
      </table>  
<p></p>
    
<p></p>
<table style="font-size:12px; background-color: #f5f5f5; border:solid 1px #ccc" width="95%">
<tr><td  colspan="13"style="border:#CCC solid 1px">Relative Risk of conception per lactation number(%)</td></tr>

<tr><td width="12%">(%)</td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact1" name="conclact1" size="4" type="text" value="100" /></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact2" name="conclact2" size="4" type="text" value="90"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact3" name="conclact3" size="4" type="text" value="88"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact4" name="conclact4" size="4" type="text" value="86"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact5" name="conclact5" size="4" type="text" value="84"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact6" name="conclact6" size="4" type="text" value="82"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact7" name="conclact7" size="4" type="text" value="80"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact8" name="conclact8" size="4" type="text" value="78"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact9" name="conclact9" size="4" type="text" value="76"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact10" name="conclact10" size="4" type="text" value="74"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact11" name="conclact11" size="4" type="text" value="72"/></td><td width="7%" align="center"><input class="span1"  style=" width:20px; height:15px; font-size:80%; padding:2px; margin:0px; display:inline"    id="conclact12" name="conclact12" size="4" type="text" value="70"/></td></tr>

<tr><td width="12%">lactatation</td><td align="center">1</td><td align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center">8</td><td align="center">9</td><td align="center">10</td><td align="center">11</td><td align="center">12</td></tr>
</table>
<p></p>
<table style="font-size:12px; background-color: #f5f5f5; border:solid 1px #ccc" width="95%"><tr><td  colspan="13"style="border:#CCC solid 1px">Enter heifers and inseminate cows?</td></tr><tr><td width="12%">Enter <br>heifers?</td><td><select class="span_1"style="width:48px;"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
</tr>
<tr><td>Inseminate cows?</td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td>
<td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td><td><select class="span_1"style="width:48px"  autocomplete="off">
  <option value="yes">Yes</option>
  <option value="no">No</option></select></td></tr>
</table>
<p></p>
<table style="font-size:12px; background-color: #f5f5f5; border:solid 1px #ccc" >
<tr><td colspan="8" style="border:#CCC solid 1px">Risk of abortion(%) per month of pregnancy</td></tr>

<tr><td>total risk of abortion(%)</td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"    id="abort2" name="abort2" size="4" type="text" value="3.5"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"    id="abort3" name="abort3" size="4" type="text" value="2.5"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"     id="abort4" name="abort4"size="4" type="text" value="1.5"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"     id="abort5" name="abort5" size="4" type="text" value="0.5"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"     id="abort6" name="abort6" size="4" type="text" value="0.3"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"     id="abort7" name="abort7" size="4" type="text" value="0.1"/></td><td><input class="span1"  style=" width:20px; height:15px; font-size:80%"     id="abort8" name="abort8" size="4" type="text" value="0.1"/></td></tr>
<tr><td>month of gestation&nbsp;&nbsp;</td><td align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center">8</td></tr>
</table> <p></p>   
   
</div>    
  <!-- hidden input grey field in excel file -->

<input  id="concseapct" size="4" type="hidden" value="100" name="concseapct">

<input type="hidden" id="heatseapct" size="4"  value="100" name="heatseapct"/>

 </form>
      
</div>
  
<p>&nbsp;</p>
      <footer class="footer">
       <%@ include file="../inc/footer.html" %>
      </footer>
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    
 
  <script type="text/javascript" src="../js/jquery.js"></script>
  <script src="../js/bootstrap.js"></script>
 
<script src="../js/computing.js"></script>
 
  </body>
</html>
<%}else
out.print("Please <a href='../jsp/login.jsp'>log in</a> first!");
%>